//
//  CrazySocketUtility.h
//  test
//
//  Created by 马军凯 on 2019/1/10.
//  Copyright © 2019年 ZH. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SocketRocket.h"

extern NSString * const kNeedPayOrderNote;
extern NSString * const kWebSocketDidOpenNote; //打开
extern NSString * const kWebSocketDidCloseNote; //关闭
extern NSString * const kWebSocketDidReceiveMessageNote; //接收消息


@interface CrazySocketUtility : NSObject

@property (nonatomic, strong) SRWebSocket *socket;

+ (instancetype)sharedSocketManager; //单例
- (void)connectServerWithUser_id:(NSString *)user_id platID:(NSString *)platID; //建立长链接
- (void)SRWebSocketClose; //关闭长链接
- (void)sendDataToServer:(id)data; //发送数据给服务器
- (void)logoutWebSocket; //退出登录

@end
